#!/usr/bin/env python3
# encoding: utf-8

"""
@version: 1.0
@author: 周永波
@file: baseInfo.py
@time: 2020/8/13 9:30
"""
from typing import Any


from demoApp.setting.database import db


class User(db.Model):
    __tablename__ = 'user'
    id = db.Column(db.Integer, primary_key=True)
    userName = db.Column(db.String(80), unique=True, name='user_name')
    email = db.Column(db.String(320), unique=True)
    password = db.Column(db.String(32), nullable=False)
    sas = [{'name':123},{'name':456}]

    def __repr__(self):
        return self.__dict__
        # return '<User %r>' % self.userName

class Admin(db.Model):
    __tablename__ = 'admin'
    id = db.Column(db.Integer, primary_key=True)
    userName = db.Column(db.String(80), unique=True, name='user_name')
    email = db.Column(db.String(320), unique=True)
    password = db.Column(db.String(32), nullable=False)

    def __repr__(self):
        return '<Admin %r>' % self.userName